package zhh.tangbao.commodity.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import zhh.tangbao.auxiliary.entity.SystemMessage;
import zhh.tangbao.commodity.entity.CommodityEntity;
import zhh.tangbao.commodity.vo.commodity.CustomCommodityVo;
import zhh.tangbao.system.dto.BaseEntityUpdateDto;

import java.util.Collection;
import java.util.List;

/**
 * 2023/2/28
 * @author 粥灰灰
 * @version 1.0
 * 描述
 */


@Repository
@Mapper
public interface CommodityEntityDao extends BaseMapper<CommodityEntity> {

    int batchUpdateSellStatus(@Param("ids") List<String> ids, @Param("sellStatus") int sellStatus, @Param("dto") BaseEntityUpdateDto dto);

    int batchDelete(@Param("ids") List<String> ids, @Param("dto") BaseEntityUpdateDto dto);

    int insertBatchSomeColumn(Collection<CommodityEntity> commodityEntity);

    List<CustomCommodityVo> getCommodityNameByIds(@Param("ids") List<String> ids);
}
